<script>


;
(function (document) {
    function parseUrl() {
        var url = location.href;
        var i = url.indexOf('?');
        if (i == -1) return;
        var querystr = url.substr(i + 1);
        var arr1 = querystr.split('&');
        var arr2 = new Object();
        for (i in arr1) {
            var ta = arr1[i].split('=');
            arr2[ta[0]] = ta[1];
        }
        return arr2;
    }

    function setCookie(name, value) {
        var minutes = 30;
        var exp = new Date();
        exp.setTime(exp.getTime() + minutes   * 60 * 1000);
        document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString();
    }

    var v = parseUrl();
    if (v !== null ) {
        if (v['u'] != null&& v['u']!=='')
            setCookie("userName", v['u'])
    }
})(document);

</script>